package com.chzn.factoryBean;

import com.chzn.entity.User;
import org.springframework.beans.factory.SmartFactoryBean;
import org.springframework.stereotype.Component;

@Component
public class MySmartFactoryBean implements SmartFactoryBean<User> {
	@Override
	public User getObject() {
		System.out.println("【FactoryBean】===UserService实现SmartFactoryBean接口的getObject");
		return new User();
	}

	@Override
	public Class<?> getObjectType() {
		return User.class;
	}

	@Override
	public boolean isPrototype() {
		return false;
	}

	@Override
	public boolean isEagerInit() {
		return false;
	}

	@Override
	public boolean isSingleton() {
		return false;
	}
}
